//
// Created by wkm on 2023-12-11.
//

#ifndef MYSYSTEMCLEARNING_DFF_H
#define MYSYSTEMCLEARNING_DFF_H

#include "systemc.h"

SC_MODULE(dff) {
    sc_in<bool> d, clk, reset;
    sc_out<bool> q;

    void prc_dff();

    SC_CTOR(dff) {
        SC_METHOD(prc_dff);
        sensitive_pos << clk;  // 沿敏感
        sensitive_neg << reset;
    }
};

#endif //MYSYSTEMCLEARNING_DFF_H
